import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/page/home/home'
import HomeBase from '@/page/home/homeBase'
import ArticleInfo from '@/page/article/articleInfo'
import My from '@/page/my/my'
import WriteArticle from '@/page/article/writearticle'
import Login from '@/page/login'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HomeBase',
      component: HomeBase,
      children:[
        {
          path: '/home',
          name: 'Home',
          component: Home,
          meta:{index:0}
        },
        {
          path: '/article',
          name: 'ArticleInfo',
          component: ArticleInfo,
          meta:{index:1}
        },
        {
          path: '/my',
          name: 'My',
          component: My,
          meta:{index:3}
        },{
          path: '/write',
          name: 'WriteArticle',
          component: WriteArticle,

        }
      ]
    },{
      path: '/login',
      name: 'Login',
      component: Login,
    }
  ]
})
